﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

[Serializable]
public abstract class VREffects : MonoBehaviour{

    public ColorBlock colors;
    public enum ColorState {Normal = 0,Highlighted = 1,Pressed = 2,Disabled = 3 }
    public abstract void Scale(bool add);
    public abstract void ChangeColor(Color c);
    public abstract void ShowHide(bool b);

    public virtual void ChangeColor(ColorState colorState)
    {
        Color c;
        switch (colorState)
        {
            case ColorState.Normal:
                c = colors.normalColor;
                break;
            case ColorState.Highlighted:
                c = colors.highlightedColor;
                break;
            case ColorState.Pressed:
                c = colors.pressedColor;
                break;
            case ColorState.Disabled:
                c = colors.disabledColor;
                break;
            default:
                c = colors.normalColor;
                break;
        }
        ChangeColor(c);
    }
    protected virtual void ImageChangeColor(Image image, Color color)
    {
        image.color = color;
    }
}
